<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<script type="text/javascript">
 function sum()
  {
  
  let s = 0;
  for(let i=0; i<arguments.length; ++i)
  {
	s += arguments[i];
	}
	return s;
}
	
document.write("1+2="+sum(1,2)+"</br>");
document.write("5+9+7="+sum(5,9,7)+"</br>");
document.write("1+2+3+9="+sum(1,2,3,9)+"</br>");
document.write("10+20+12+30="+sum(10,20,12,30)+"</br>");
  
  
 </script>

<body>
</body>
</html>
